package cn.net.ecode.tools.ecodeplatformmaker.action;

import org.eclipse.jface.action.Action;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.MessageBox;
import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.internal.IWorkbenchGraphicConstants;
import org.eclipse.ui.internal.WorkbenchImages;

public class ConnEditAction extends Action {
	private IWorkbenchWindow window;

	public ConnEditAction(IWorkbenchWindow window) {
		this.window = window;
		this.setText("Hello");
		ImageDescriptor imgDes = WorkbenchImages
				.getImageDescriptor(IWorkbenchGraphicConstants.IMG_ETOOL_EXPORT_WIZ);
		this.setImageDescriptor(imgDes);
	}

	public void run() {
		MessageBox mb = new MessageBox(window.getShell(), SWT.OK);
		mb.setMessage("Hello world!");
		mb.setText("Demo");
		mb.open();
	}
}
